<template>
	<view class="wrap">
		<view class="title">
			{{info.title}}
		</view>
		<view class="time">
			{{info.date}}
		</view>
		<image :src="info.image" mode="widthFix"></image>
		<rich-text :nodes="info.content"></rich-text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				article_id: '',
				info: {}
			}
		},
		onLoad(option) {
			this.article_id = option.article_id
			this.getDetail()
		},
		methods: {
			getDetail() {
				this.$post("/index/article_detail", {
					article_id: this.article_id
				}).then(res => {
					this.info = res.data
				})
			}
		}
	}
</script>

<style lang="scss">
	.title {
		font-weight: bold;
		font-size: 40rpx;
		padding: 40rpx 0;
	}

	.time {
		padding-bottom: 30rpx;
		font-size: 24rpx;
		color: #b2b2b2;
		border-bottom: 1rpx solid #eee;
	}
</style>